package com.lb.jwitter;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.ForeignKey;

@Entity
@Table (name="tbl_dkmh_dotdk_hocvien_chitiet")
public class Tbl_DKMH_DotDK_HocVien_ChiTiet implements Serializable {
   private static final long serialVersionUID = -1989579066723007050L;

   private Long id;
   private Tbl_DKMH_DotDK_HocVien dotDKHocVienId = null;
   private Date ngayBatDau;
   private Date ngayKetThuc;
   private String quyen;
   private Tbl_DKMH_DotDK_Nhom nhomDKId = null;

   @Id
   @GeneratedValue
   public Long getId() {
	    return id;
   }
   public void setId(Long id) {
	    this.id= id;
   }

   @ManyToOne(fetch=FetchType.EAGER)
   @JoinColumn(name="DotDKHocVienId")
   @ForeignKey(name="FK_tbl_DKMH_DotDK_HocVien_tbl_DKMH_DotDK_HocVien_ChiTiet")
   public Tbl_DKMH_DotDK_HocVien getDotDKHocVienId() {
	    return dotDKHocVienId;
   }
   public void setDotDKHocVienId(Tbl_DKMH_DotDK_HocVien dotDKHocVienId) {
	    this.dotDKHocVienId=dotDKHocVienId;
   }

   public Date getNgayBatDau() {
   	return ngayBatDau;
   }
   public void setNgayBatDau(Date ngayBatDau) {
   	this.ngayBatDau= ngayBatDau;
   }

   public Date getNgayKetThuc() {
   	return ngayKetThuc;
   }
   public void setNgayKetThuc(Date ngayKetThuc) {
   	this.ngayKetThuc= ngayKetThuc;
   }

   public String getQuyen() {
   	return quyen;
   }
   public void setQuyen(String quyen) {
   	this.quyen= quyen;
   }

   @ManyToOne(fetch=FetchType.EAGER)
   @JoinColumn(name="NhomDKId")
   @ForeignKey(name="FK_tbl_DKMH_DotDK_Nhom_tbl_DKMH_DotDK_HocVien_ChiTiet")
   public Tbl_DKMH_DotDK_Nhom getNhomDKId() {
	    return nhomDKId;
   }
   public void setNhomDKId(Tbl_DKMH_DotDK_Nhom nhomDKId) {
	    this.nhomDKId=nhomDKId;
   }
}//endClass 

